import React from 'react';
import {Switch, Route } from 'react-router-dom';

import Success from "../RouterView/ShopCart/success"
import Close from '../RouterView/ShopCart/close';
import TestView from "../RouterView/TestView/index"; // 组件测试
import Index from "../RouterView/Index/index";
import Home from "../RouterView/Home/index";
import BookSell from "../RouterView/BookSell/index";
import ShopCart from "../RouterView/ShopCart/index";
import Me from "../RouterView/Me";
import Login from "../RouterView/Login/index";
import User from '../RouterView/User/index'  //个人信息的修改
import ScanCode from "../RouterView/ScanCode/index"; // 扫描图书条码
import BookInfoPull from "../RouterView/BookInfoPull/index"; // 手动填写图书信息
import BookInfoRelease from "../RouterView/BookInfoRelease/index"; // 图书发布
import ReleaseSuccess from '../RouterView/ReleaseSuccess'; // 图书发布成功
import Tuijian from  '../RouterView/TuiJian/index'  //书单推荐
import Hot from '../RouterView/Hot/hot' //热搜榜单
import BookInfoDetails from '../RouterView/BookInfoDetails/index'  //商品详情
import NearbyOnsell from '../RouterView/NearbyOnsell/index'; // 附近在售
import Address from '../RouterView/Address/address'  //收货地址
import Add from "../RouterView/Add/add"  //添加收货地址
import MeBuy from "../RouterView/MeBuy/mebuy" //我的买入
import Want from "../RouterView/Want/want"  //我的想要
import SoldOut from "../RouterView/SoldOut/soldOut" //我的已售
import Onsale from "../RouterView/Onsale/index"  //我的在售
import Information from "../RouterView/Information/information"   //消息中心
import PrivateChat from "../RouterView/PrivateChat/index";
import Classify from "../RouterView/Classify/Classify"  //全部分类
import List from "../RouterView/List/list"  //全部分类的具体体现
import PrivateInfo from "../RouterView/PrivateInfo"; // 账户安全
import PlatformRules from "../RouterView/PlatformRules"; // 平台规则文档
import CustomerCenter from "../RouterView/CustomerCenter"; // 平台客服中心
import Pay from "../RouterView/ShopCart/pay/pay"  //订单支付界面
import Unpay from "../RouterView/ShopCart/Unpay/unpay" //代付款页面
import BookSearchKey from "../RouterView/BookSearchKey";
const RouterRoot = (
    <Switch>
        <Route path="/bookSearchKey" component={BookSearchKey} />
        <Route path="/unpay" component={Unpay}></Route>
        <Route path="/pay" component={Pay}></Route>
        <Route path="/customerCenter" component={CustomerCenter} />
        <Route path="/platformRules" component={PlatformRules} />
        <Route path = "/privateInfo" component={PrivateInfo} />
        <Route path="/list" component={List}></Route>
        <Route path="/classify" component={Classify}></Route>
        <Route path="/privateChat" component={PrivateChat} />
        <Route path="/information" component={Information}></Route>
        <Route path="/onsale" component={Onsale}></Route>
        <Route path="/soldout" component={SoldOut}></Route>
        <Route path="/want" component={Want}></Route>
        <Route path="/mebuy" component={MeBuy}></Route>
        <Route path="/add" component={Add}></Route>
        <Route path="/address" component={Address}></Route>
        <Route path="/success" component={Success}></Route>,
        <Route path="/nearbyonsell" component={NearbyOnsell}></Route>,
        <Route path="/tuijian" component={Tuijian}></Route>,
        <Route path="/close" component={Close} />,
        <Route path="/bookInfoDetails/:bid" component={BookInfoDetails}/>,
        <Route path="/hot" component={Hot}></Route>,
        <Route path="/tuijian" component={Tuijian}></Route>,
        <Route path="/bookinforelease" component={BookInfoRelease} />,
        <Route path="/releaseSuccess" component={ReleaseSuccess} />
        <Route path="/bookinfopull" component={BookInfoPull} />,
        <Route path="/scancode" component={ScanCode} />,
        <Route path="/user" component = {User}/>,
        <Route path="/testview" component={TestView}/>, {/* 组件测试 */}
        <Route path="/login" component = {Login}/>,
        <Route path="/me" component = {Me}/>,
        <Route path="/shopcart" component = {ShopCart} />,
        <Route path="/booksell" component = {BookSell} />,
        <Route path="/home" component = {Home}/>,
        <Route path="/" component = {Index}/>,
    </Switch>
);

export default RouterRoot;